package com.kaifamiao.service.Impl;

import com.kaifamiao.mapper.YymanagerMapper;
import com.kaifamiao.model.YymanagerModel;
import com.kaifamiao.service.YymanagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service("yymanagerService")
@Transactional(propagation = Propagation.REQUIRED)
public class YymanageServiceImpl implements YymanagerService {
    @Autowired
    private YymanagerMapper mapper;
    @Override
    public List<YymanagerModel> findAll() {
        return mapper.selectAll();
    }

    @Override
    public YymanagerModel findById(Long id) {
        return mapper.selectByPrimaryKey(id);
    }
}
